/**
 * 详情对话框
 */
var InfoInfoDlg = {
    data: {
        goodsId: "",
        goodsCode: "",
        classification: "",
        type: "",
        brand: "",
        model: "",
        company: "",
        count: "",
        remarks: "",
        frontPhoto: "",
        backPhoto: "",
        version: "",
        createTime: "",
        updateTime: "",
        createUser: "",
        updateUser: "",
        companyName: "",
        typeName: ""
    }
};

layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () {
    var $ = layui.jquery;
    var $ax = layui.ax;
    var form = layui.form;
    var admin = layui.admin;
    var upload = layui.upload;


    //获取详情信息，填充表单
    var ajax = new $ax(Feng.ctxPath + "/info/getone?goodsId=" + Feng.getUrlParam("goodsId"),function (data) {
         var aj=new $ax(Feng.ctxPath + "/file/get?id="+data.data.frontPhoto, function (da) {
             if(da.response != false) {
                 $('#img1').attr("src", da.data);
             }
         });
         aj.start();
         var aj1=new $ax(Feng.ctxPath + "/file/get?id="+data.data.backPhoto, function (da) {
             if(da.response != false) {
                 $('#img2').attr("src", da.data);
             }
        });
        aj1.start();
    });
    var result = ajax.start();
    form.val('infoForm', result.data);
});